package vn.vfriends.payment.service.impl;

import java.util.List;
import javax.inject.Inject;
import vn.vfriends.payment.jpa.controller.PageJpaController;
import vn.vfriends.payment.jpa.entity.Page;
import vn.vfriends.payment.service.PageService;

/**
 *
 * @author tuan@vfriends.vn
 */
public class PageServiceImpl implements PageService {

    @Inject private PageJpaController pageController;
    
    @Override
    public void create(Page page) throws Exception {
        pageController.create(page);
    }

    @Override
    public void edit(Page page) throws Exception {
        pageController.edit(page);
    }

    @Override
    public void destroy(Long id) throws Exception {
        pageController.destroy(id);
    }

    @Override
    public List<Page> findPages() {
        return pageController.findPages();
    }

    @Override
    public Page findPage(Long id) {
        return pageController.findPage(id);
    }

    @Override
    public Page findPageByName(String name) {
        return pageController.findPageByName(name);
    }

    @Override
    public Page findPageByLink(String link) {
        return pageController.findPageByLink(link);
    }

    @Override
    public int getPageCount() {
        return pageController.getPageCount();
    }

}
